/*
 * @Author: Liu
 * @Date: 2023-05-04 14:23:21
 * @LastEditTime: 2023-05-15 19:47:08
 */
import { createRouter, createWebHistory,createWebHashHistory } from 'vue-router'
import * as VueRouter from 'vue-router'

import Layout from '../layout/index.vue'
import Home from "../pages/home.vue"
import Game from "../pages/game.vue"
import Ranking from "../pages/ranking.vue"
import Test from '../pages/test.vue'
/**
 * @type {import('vue-router').RouteRecordRaw[]}
 */
const routes = [
  {
    path: '/',
    component: Layout,
    children: [
      { path: '/', component: Home },
      { path: '/game', component: Game },
      { path: '/ranking', component: Ranking },
      {
        path: '/test', component: Test
      }
    ]
  },
  {
    path: '/download',
    component: () => import('../pages/appDownload.vue')
  }
]

const router = createRouter({
  // history:createWebHistory(),
  history: createWebHashHistory(),
  routes,
})

export default router